package com.jinkaimen.goodcash.ui.activity;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.ht.baselibs.ui.base.BaseActivity;
import com.ht.baselibs.utils.ActivityUtils;
import com.jinkaimen.goodcash.R;
public class BindSuccessActivity extends BaseActivity {

    public static final String BANK_NAME = "bank_name";
    public static final String WITHDRAW_MONEY = "withdraw_money";
    public static final String LEFT_MONEY = "left_money";
    public static final String GET_MONEY = "get_money";

    private TextView mBankNameView;
    private TextView mWithdrawMoneyView;
    private TextView mLeftMoneyView;
    private TextView mGetMoneyView;

    private String mBankName;
    private String mWithdrawMoney;
    private String mLeftMoney;
    private String mGetMoney;

    @Override
    protected boolean isStaticPage() {
        return true;
    }

    @Override
    protected void initIntentData(Intent callIntent) {
        mBankName = callIntent.getStringExtra("qr_code");
        mWithdrawMoney = callIntent.getStringExtra("shop_name");
        mLeftMoney = callIntent.getStringExtra("zhifubao_rate");
        mGetMoney = callIntent.getStringExtra("weixin_rate");
    }

    @Override
    protected void initTitleBar() {
        mTitleBarView.setTitleText("绑定成功成功");
    }

    @Override
    protected int initContentView() {
        return R.layout.activity_withdraw_success;
    }

    @Override
    protected void initChildView() {
        mBankNameView = (TextView) findViewById(R.id.tv_activity_withdraw_success_bankname);
        mWithdrawMoneyView = (TextView) findViewById(R.id.tv_activity_withdraw_success_withdraw_money);
        mLeftMoneyView = (TextView) findViewById(R.id.tv_activity_withdraw_success_left_money);
        mGetMoneyView = (TextView) findViewById(R.id.tv_activity_withdraw_success_get_money);
    }

    @Override
    protected void initChildData() {
        mBankNameView.setText(mBankName);
        mWithdrawMoneyView.setText(mWithdrawMoney);
        mLeftMoneyView.setText(mLeftMoney);
        mGetMoneyView.setText(mGetMoney);
    }

    @Override
    protected void setChildViewListener() {
        findViewById(R.id.btn_activity_withdraw_success).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()){
            case R.id.btn_activity_withdraw_success:
                ActivityUtils.finishActivity(this);
                break;
        }
    }
}
